package com.etime.shycourse.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.etime.shycourse.pojo.StudyRecord;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * 学习记录dao层
 */
@Repository
public interface StudyRecordDao extends BaseMapper<StudyRecord> {

    /**
     *
     * @param record
     * @return
     */
    @Select("select * from studyrecord where ruserid=#{ruserid} and rcourseid=#{rcourseid} " +
            " order by entime desc limit 0,1")
    StudyRecord selectStudyRecordByCourseId(StudyRecord record);
}
